﻿@model WebUI.Models.aspnet_Users
@{ViewBag.Title = "医生信息";}           
@using (Ajax.BeginForm(new AjaxOptions()
{
    LoadingElementId="OnLoadingSpan",UpdateTargetId = "DoctorListView",
    InsertionMode = InsertionMode.Replace,
    HttpMethod = "Post",
    OnSuccess = "$('#dialogbox').dialog('close');",
    OnFailure = "OnSiteError"
}))
{
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>医生信息</legend>

        @Html.HiddenFor(model => model.UserId)

        <div class="editor-label">
            @Html.LabelFor(model => model.UserName)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.UserName)
            @Html.ValidationMessageFor(model => model.UserName)
        </div>

        <div class="editor-label">
            Password
        </div>
        <div class="editor-field">
            @Html.Password("Pwd")
        </div>


        <div class="editor-label">
            @Html.LabelFor(model => model.MobileAlias)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.MobileAlias)
            @Html.ValidationMessageFor(model => model.MobileAlias)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.HospitalID)
        </div>
        <div class="editor-field">
            @Html.DropDownListFor(model => model.HospitalID,new SelectList(ViewBag.Hospitals,"HospitalID","HospName"))
            @Html.ValidationMessageFor(model => model.HospitalID)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.DepartmentID)
        </div>        
        <div class="editor-label">
            @Html.LabelFor(model => model.DepartmentID)
        </div>
        <div class="editor-field">
            @Html.DropDownListFor(model => model.DepartmentID,new SelectList(ViewBag.Departments,"DepartmentID","DepName"))
            @Html.ValidationMessageFor(model => model.DepartmentID)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.AccountStatus)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.AccountStatus, "Status")
            @Html.ValidationMessageFor(model => model.AccountStatus)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Gender)
        </div>
        <div class="editor-field">
            @Html.DropDownListFor(model => model.Gender,new SelectList(new string[]{"男","女"}))
            @Html.ValidationMessageFor(model => model.Gender)
        </div>

        <p>
            <input type="submit" value="确定" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
